import request from '@/utils/request'
/**
 * 信息流分页列表
 * @param params
 */
export function fetchInformationFlow(params: any = {}) {
  return request({
    url: '/zgyp-work/api/v1/InformationFlow/page',
    method: 'get',
    params,
  })
}
/**
 * 获取信息流数据详情
 * @param params
 */
export function fetchInformationFlowDetail(params?: any) {
  return request({
    url: `/zgyp-work/api/v1/InformationFlow/${params.assetId}/form`,
    method: 'get',
    params,
  })
}
/**
 * 修改信息流数据
 * @param data
 */
export function editInformationFlow(data: any) {
  return request({
    url: `/zgyp-work/api/v1/InformationFlow/${data.id}`,
    method: 'put',
    data,
  })
}
/**
 * 增加信息流填报数据
 * @param data
 */
export function addInformationFlow(data: any) {
  return request({
    url: `/zgyp-work/api/v1/InformationFlow`,
    method: 'post',
    data,
  })
}
/**
 * 删除信息流填报数据
 * @param data
 */
export function deleteInformationFlow(data: any) {
  return request({
    url: `/zgyp-work/api/v1/InformationFlow/${data.ids}`,
    method: 'DELETE',
    data,
  })
}

/**
 * 信息流数据图表
 * @param data
 */
export function fetchInFormationFolwStatistic(data: any) {
  return request({
    url: `/zgyp-work/api/v1/InformationFlow/InFormationFolwStatistic/cate`,
    method: 'post',
    data,
  })
}
